package com.test.pudamoney.util_pudamoney.analytics_pudamoney.bean_pudamoney

import android.content.pm.PackageManager
import android.os.Build
import com.test.pudamoney.activity_fragment_pudamoney.base_pudamoney.BaseApplication_pudamoney
import com.test.pudamoney.constant_pudamoney.Constant_pudamoney
import com.test.pudamoney.util_pudamoney.analytics_pudamoney.util_pudamoney.AnalyticsUtil_pudamoney
import com.test.pudamoney.util_pudamoney.analytics_pudamoney.util_pudamoney.FirebaseUtil_pudamoney
import java.util.*

class ParamFirebaseS2S_pudamoney(
    /** 产品名 */
    var name: String = Constant_pudamoney.NAME,
    /** 版本号 */
    var OSAndVersion: String = "Android ${Build.VERSION.RELEASE}",
    /** 语言 */
    var locale: String = Locale.getDefault().toString(),
    /** 设备 */
    var device: String = Build.MODEL,
    /** app版本号 */
    var appVersion: String = Constant_pudamoney.APP_VERSION,
    /** sdk版本号 */
    var sdkVersion: String = Constant_pudamoney.APP_VERSION,
    /** build */
    var build: String = "Build/${Build.ID}",
    /** 广告是否限制跟踪 */
    var lat: String = AnalyticsUtil_pudamoney.getAdEnabled().toString(),
    /** firebasse id */
    var firebaseAppId: String = FirebaseUtil_pudamoney.getFirebaseAppId(),
    /** ga4 id */
    var ga4AppInstanceId: String = FirebaseUtil_pudamoney.getGa4InstanceId()
) : ParamBase_pudamoney() {
    init {
        //组装版本号
        val vVersion =
            BaseApplication_pudamoney.getApplication_pudamoney().packageManager.getPackageInfo(
                BaseApplication_pudamoney.getApplication_pudamoney().packageName,
                PackageManager.GET_META_DATA
            ).versionName
        this.appVersion = vVersion
        this.sdkVersion = vVersion
    }
}


